home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-06 | 6.0 KB | 125 lines | [TEXT/MPS ] |
- KIBITZ: The Why and How.
-
- As a alternative kind of sample, we here in DTS did a complete application.
- Granted, a game is by no means as complete an application as you dudes out
- there write, but at least the same kinds of issues are addressed.
-
- With an application this size, structure becomes important. You will note a
- good number of source files. Hopefully, I have broken the code up into logical
- enough pieces that finding a piece of code is no problem.
-
- As I wrote this sample, I tried to fully address development areas as they came
- up. Thre is a file I/O unit, which is rather general in structure. Hopefully
- this code can be useful as it currently stands. (If it isn't, then I did
- something wrong.)
-
- Along with the file I/O unit, I wrote a TextEdit control. This was done so
- that TextEdit items could easily be put into non-dialog windows. The same
- philosophy behind the file I/O unit was applied to the TextEdit control. Now
- that the TextEdit control is complete, it (hopefully) will be easier for
- developers to add TextEdit items to non-dialog windows.
-
- Of course, I am looking for suggestions as to how to make these units more
- general and useful. Any suggestions are welcome.
-
-
- As you are most probably aware, DTS shut down for three weeks so that we could
- learn 7.0, write sample code, and stuff like that. I would like to take some
- read.me space to thank you for your patience during this period. Hopefully,
- you will agree that it was time well spent.
-
-
- Now to the application itself:
-
- First, I would like to explain why I did a chess game. I was assigned to
- write sample code for the AppleEvents part of 7.0. Keith Rollin had been doing
- AppleEvents stuff up to the shutdown, and you will see a good amount of his
- work in this sample.
-
- Just before the shutdown, and for the first week of the shutdown, we were to
- determine what our sample would be. Since I hardly knew the Mac, didn't know
- the first thing about 7.0, and probably less about AppleEvents, I spent a lot
- of time learning, and not much time deciding what my sample should be.
-
- This situation was getting a bit desperate, since we were supposed to announce
- what our sample was going to be in a matter of days. Around this time, Keith
- bailed me out by giving me the idea of a chess game using AppleEvents. I
- immediately liked the idea for two reasons. The first is that is was a cool
- idea. The second was that I hadn't thought of a darn thing myself, so this
- idea was better than facing my DTS peers with a comment like: "Gee, I, uh,
- well, I don't have an idea. My brain's gone."
-
- So, chess it was.
-
-
- I used to play a lot of chess in my younger days. In trying to come up with a
- theme for this chess application, I thought back to what really annoyed me
- when I was playing chess. The most annoying thing was the kibitzer who would
- just not go away, and would string on endless comments. It seemed like a
- natural theme for my game. It is a good Yiddish word, plus it offered the
- opportunity to send more AppleEvents messages than just chess moves.
-
- So, as a design specification, I made sure that there was no way for the player
- to get rid of the message (other than quitting the game) from the other player.
- This adds a touch of realism that true chess players should appreciate.
-
- The full design specification has not been implemented for this version, but
- may be implemented for future versions. As a suggestion from Keith Rollin,
- I would like to put in some sort of challenge board or automatic rating system.
- (USCF rating system, maybe.) Guillermo Ortiz would like a spectator mode where
- you can hook up to a game in progress and send messages to the players. (You
- wouldn't be able to make any moves, but you could annoy the heck out of the
- players. And of course, there would be no way that the players can make you
- stop sending messages. Ah, that touch of realism again!)
-
- What is in this version is a reasonably complete first pass at an application.
- It is fully functional, and seems to be rather solid, although we are calling
- it Beta software at this point.
-
- There is a good amount of code in Kibitz that isn't necessary in terms of a
- standard DTS sample project, but I couldn't help myself. Checking for legal
- moves, for example. I couldn't handle the idea of somebody making illegal
- moves with my software. I just had to check to see if the move was legal.
- When reviewing the sample code, you can just ignore this code. I put all the
- chess-specific code in a single file to make it easier to ignore. I think you
- will agree however, that I didn't spend too much time getting the computer to
- play good chess. (Maybe next version...)
-
-
-
- At this point, I would like to thank a number of people for their
- contributions. These folk are:
-
- Keith Rollin, who had the original idea, did the ground-breaking work for
- AppleEvents, put up with many questions from me, did the Traffic Light 2.0
- sample which I modified to form ShellApp which I used as the basis for my
- sample, did code review, etc., etc., etc. (Is a thank-you enough?)
-
- Pete Helme, who got parts of the AppleEvents stuff to work when I couldn't.
-
- Forrest Tanaka, who made sure that I wasn't doing brain-dead things with
- TextEdit. Pointers from him were most helpful. (It could have been
- embarrasing for me if he didn't steer me right.)
-
- Guillermo Ortiz, who made numerous human-interface suggestions that really
- improved the smoothness of the game, as well as various suggestions (as yet
- to be implemented) for features.
-
- Dave Radcliffe, who made sure that various segments of my code were legible.
-
- Bryan Stearns, whose TESample I used as a basis for my TextEdit control.
-
- John Harvey, who answered questions of any topic, independent of whether or
- not it was a stupid question.
-
- John Sullivan, who is a human-interface guy who had a lot of good advice.
- (If you like the slider and the real-time update, even across the network,
- thank him. He shamed me into it.)
-
- There were, of course, numerous other people as well, who gave me comments,
- played me games to test the thing, and development stuff like that. (Thanks.)
-
-
-
- Eric Soldan
-